// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once

#include "targetver.h"

#include <stdio.h>
#include <tchar.h>



// TODO: reference additional headers your program requires here

//constant
#define NUM_MATERIAL			4
#define NUM_DIE					2
#define MATERIAL_NAME_LENGTH	20
#define TIME_STEP_FACTOR		0.1
#define OUTPUT_FREQUENCY		0.02
#define GOAL_TEMPERATURE		300
#define TOUCH_FACTOR			0.7
#define BLOCK_SIZE				256
#define PLATE_INIT_TEMP			900
#define AIR_INIT_TEMP			20 
#define TIME_ACCURACY			100000                  //time accuracy control number  


//struct
struct material
{
	int		id;
	char	name[MATERIAL_NAME_LENGTH];
	double	htc;							//heat transfer coefficient,	unit:W/(m*K)
	double	sh;								//specific heat,				unit:J/(kg*K)
	double	density;						//density,						unit:kg/m^3
	double	initTemp;						//init temprature,				unit:K
	double	both[NUM_MATERIAL];
};

struct die2D
{
	double height;
	double width;
};

struct dieNum2D
{
	int heightNum;
	int widthNum;
};


struct plate2D
{
	double height;
	double width;
};

struct plateNum2D
{
	int heightNum;
	int widthNum;
};


#include <Windows.h>
#include <malloc.h>
#include "io.h"
#include "fourierCuda2D.h"



